import { createStore } from "vuex";

const store = createStore({
  state() {
    return {
      loginUser: {
        id: 1,
        username: "admin",
        password: null,
        email: "admin@admin.com",
        playerName: "hekaihao",
        balance: 0,
        regIp: "1.1.1.1",
        regTime: "2021-09-22T20:58:00",
        userRole: 1,
      },
    };
  },
  mutations: {
    updateUser(state, payload) {
      state.loginUser = payload;
    },
  },
});

export default store;
